package com.qianyu.project.web.controller.smj;

import com.qianyu.project.entity.LaborContract;
import com.qianyu.project.service.smj.smjLaberService;
import com.qianyu.project.utils.ResultTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("smj_laber")
public class smjLaberController {
    @Autowired
    private smjLaberService lc;

    @GetMapping("")
    public String  Addlaber(String create_date,String contract_name,String p_id,String amount_upper,String contract_type,String contract_amount,String start_date,String end_date,String labor_org_id,String settle_type,String advance_pay,String deposit_amount,String payment_type,String contract_signatory,String pay_condition,String main_term,String comment,String attach_ids){
          return lc.Addlaber( create_date,  contract_name, p_id, contract_type, contract_amount, start_date, end_date, labor_org_id, settle_type, advance_pay, deposit_amount, payment_type, contract_signatory, pay_condition, main_term, comment, attach_ids,amount_upper);
    }

    @GetMapping("/labor_work_list")
    public void Addlaborworklist(String work_content,String unit,String work_count,String unit_price,String id){
        lc.Addlaborworklist(work_content,unit,work_count,unit_price,id);
    }

    @PostMapping("Flow_laber")
    public Integer FlowLaber(@RequestBody LaborContract laborContract){
        return  lc.FlowLaber(laborContract);
    }

    @GetMapping("/UpdateInfo")
    public void UpdateInfo(String ids,String infoname){
        lc.UpdateInfo(ids,infoname);
    }

    @GetMapping("/getWorkList")
    public List<Map<String ,Object>> getWorkList(String id){
        return lc.getWorkList(id);
    }

    @GetMapping("/getfromaudit")
    public List<Map<String ,Object>> getfromaudit(String id){
        return lc.getfromaudit(id);
    }


}
